# -*- encoding: utf-8 -*-
'''
@File    :   1.py
@Time    :   2022/11/09 23:11:16
@Author  :   Cms 
@Version :   1.0
@Contact :   2267000140@qq.com
@WebSite    :   www.baidu.com
'''

# here put the import lib

# 写一个程序，读取键盘输入的任意行文字信息，当输入空行时结束输入，
# 将读入的字符串存于列表;然后将列表里面的内容写入到文件input.txt中；

def myfunc():
    list1 = []
    while(1):
        str1 = input()
        if(str1 == ' '):
            break
        else:
            list1.append(str1)
    return list1

if __name__ == "__main__":
    
    list1 = myfunc()

    with open(r"homework3\input.txt","w") as f:
        for i in list1:
            f.write(i)